package com.hb.trans.mvp.ui.activity


import android.os.Bundle
import android.view.MenuItem
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.basiclib.base.BaseActivity
import com.hb.trans.R
import com.hb.trans.global.ACTIVITY_NO_DETAIL
import com.hb.trans.mvp.presenter.NewDetailPresenter
import dagger.android.AndroidInjection
import kotlinx.android.synthetic.main.activity_no_detail.*
import javax.inject.Inject


@Route(path = ACTIVITY_NO_DETAIL)
class NoDetailActivity : BaseActivity() {
    @Inject
    override fun getContentViewResId(): Int = R.layout.activity_no_detail

    override fun onActivityInject() {
        AndroidInjection.inject(this)
    }

    override fun attachView(savedInstanceState: Bundle?) {
        ARouter.getInstance().inject(this)
    }

    override fun getPresenter(): NewDetailPresenter? = null

    override fun initView() {
        setSupportActionBar(noDetailToolbar.toolbar)
        supportActionBar!!.setDisplayHomeAsUpEnabled(true)
        supportActionBar!!.setHomeAsUpIndicator(R.mipmap.ic_left_arrow)
    }

    override fun onOptionsItemSelected(item: MenuItem): Boolean {
        when (item.itemId) {
            android.R.id.home -> onBackPressed()
        }
        return true
    }

    override fun initData() {
    }

    override fun setListener() {
    }
}
